function [s,byte_sequence]=transmit_qpsk_gray(byte_sequence,nt)

%makes sure number of digits in byte string is multiple of number of transmit antennas
zero_padding_bytes=ceil(length(byte_sequence)/2/nt)*2*nt-length(byte_sequence);
byte_sequence=horzcat(byte_sequence,zeros(1,zero_padding_bytes));

s=zeros(nt,ceil(length(byte_sequence)/2/nt));
for n=1:2:length(byte_sequence)
	row=mod(floor((n-1)/2),nt)+1;
	col=floor(n/2/nt)+1;
	s(row,col)=bin2qpsk([byte_sequence(n) byte_sequence(n+1)]);
end

